paned: hide the handle widget when <2 children are visible
authorBenjamin Otte <otte@redhat.com>
Tue, 12 Mar 2019 01:14:48 +0000 (02:14 +0100)
committerBenjamin Otte <otte@redhat.com>
Tue, 19 Mar 2019 07:48:50 +0000 (08:48 +0100)
gtk/gtkpaned.c

index ba97855c7e15e23baf31f287099405bd8209e64f..cf2e39a26e7b6e3d4181d107265fb401cf0999da 100644 (file)
@@ -1297,6 +1297,8 @@ gtk_paned_size_allocate (GtkWidget *widget,
             child2_allocation.height = child2_height;
         }
 
+      gtk_widget_set_child_visible (priv->handle_widget, TRUE);
+
       gtk_widget_size_allocate (priv->handle_widget, &handle_allocation, -1);
       gtk_widget_size_allocate (priv->child1, &child1_allocation, -1);
       gtk_widget_size_allocate (priv->child2, &child2_allocation, -1);
@@ -1318,6 +1320,8 @@ gtk_paned_size_allocate (GtkWidget *widget,
                                     &(GtkAllocation) {0, 0, width, height}, -1);
 
         }
+
+      gtk_widget_set_child_visible (priv->handle_widget, FALSE);
     }
 }